{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy\n",
    "import sympy\n",
    "sympy.init_printing()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Non-degenerate expansion:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Define symbolic variables:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "t=sympy.Symbol('t')\n",
    "k=sympy.Symbol('k')\n",
    "x=sympy.Symbol('x')\n",
    "m=sympy.Symbol('m')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pressure for particles:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAANsAAAA0CAYAAAADkU0XAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAMg0lEQVR4Ae2c6bXVNhDHL5xXAIEOSAcsFYR0kEAFgQ7g8Am+caCDJBWQpIMkFbB0AKkAeB2Q/09ohLzIlhdd+/I05+hKlqXRaDSbdG1f+vz586HCaXHg6dOnv4ri68p/TFGue3d076Pyt6k2a9drrIfC+Zvy87Vxfwv4Ln8Lk7iAc/hbc36fmreE/YbuoYyzFE39nqdwU6/74P5b6UrcTtcvdD3YN25/0cpnpzhhLep90f1I6Ve/wKtMwwvPXSF7oPLNVZCWQYJHezOA+rnoT3q9gX52q6FEVkkuvE6RVbwe10flP9XmvtJvUV0tigOnqmyEKljQbMut9ijmg9Sq6x5CROgFJIXty+3Nf2+JAhQKgf8JalTGq5BT1+CL6pgbfb5X+qBEmHdT9Ul+6H4vqA+43yrv9WCq/0fpT7Wpytbi4EmGkVpMBOoKC9uaz9AlfZIgXAgQApsMz5Kdj38D5QHIEerYi1H3TimGW5ob7V4q/ejLKFwp2Luxyp63eIWXfqfEfnQRnKRn04zxQE7RxAS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M5sG32LGGkfteVbzTsyESpZTt15BQvpzvcAyhrfcKcKB6tgJMXQOllMhCwzHPFoZTH5Qz9zscoV8tHIcDVdmOw+c5oxBGZr9HJUW7rvbs13K/wzGHptpnAQdqGLmAeYW74tmCV5MyuVdBVMdRP6/qh6fPvaJR517t8NcH5YPf4ShMf0Xf4kBVthZD9nApJUGhCAl5vQOlQdEAru31f7dX0z08GvVzvsOhbhWOxYEaRh6L09PGCfs1KZMrK+e9K5SwfUK55Dsc06iqrRdxoD6IvIh9ZTpLsfBUfDSGlxFf63r002llKKlY1+RA9WxrcnM9XHgzPBgf+uR7LPUP6vV4uxmmqmybsb5/YCkWoSL7ML51wX9mfOnsTVU4ceHEoSrb/haQ8BGwk0h7OgQFPEjpNvnqGWNXWMaBqmzL+FeiN8f3fNMwHO37QewY/1qJQSvO8hyoylaex1NHIIwMj2h5peOghL0bXi3cm4q4tt+WA/8D5A2WN2kHFoQAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\frac{\\left(-1\\right)^{k + 1} t^{2} e^{\\frac{k \\left(x + 1\\right)}{t}} K_{2}\\left(\\frac{k}{t}\\right)}{k^{2}}$"
      ],
      "text/plain": [
       "              k⋅(x + 1)              \n",
       "              ─────────              \n",
       "    k + 1  2      t            ⎛   k⎞\n",
       "(-1)     ⋅t ⋅ℯ         ⋅besselk⎜2, ─⎟\n",
       "                               ⎝   t⎠\n",
       "─────────────────────────────────────\n",
       "                   2                 \n",
       "                  k                  "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "Pk=t**2*(-1)**(k+1)/k/k*sympy.exp(k*(x+1)/t)*sympy.besselk(2,k/t)\n",
    "display(Pk)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pressure for particles and antiparticles together:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAS0A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7eGc3HRczgHnwOIccKO1OIt9AOeAc2BODlzOicxxOQdyHIiP9HnTm2SvMvAS5dq/pPCJIv88Kg640ToqcR0tsbyDlH6BU2V+poSf9vU/IDlaka5HuG8P1+P9UY9M9KSLfz76V5f9ZVlpTo8F0/ytJX6Kxn/VocQtr+/lgButXvZ4Y4kDMkL8njpfueF7ckM/CUyU9baEy+udA2M44NvDMdxy2BwH+A2s3l/YlHHrfj0FI8bPryz9TzM5er3uyDngkdaRC3BN8mV0bMs3FGklMtUHI8efdvqvlCaueGEMB9xojeGWw3Y5wPaQbWLVU0DB3RE851m1f73eHc/vnQMXvj10JdiHA0RaKcqSUSKCuqeLXy3gd7GSMYsGizoM3UW8J/ffjoIhnqo54EarmlUO2OSAjA2Gia0ery9gfDBYJHudgVca7NdIibCon/LX6+rmyTnwHwd8e/gfL7w0jgPpPEsGK5SV8wN2GLPuE0UMGDD2t+vkjwWfIjHde3IOVHHAvzBdxSYH6nJABofIiT9Z5Q8p3urenwR2meT3i3DAI61F2HoWSImciKh4CvhERsv//ussxL7+JN1orS+Do6NABootIOdU/B0671zx++bv3HCJC54W54AbrcVZfJIDsC0k2ZNDe9sdQ3Yh48U/JHtyDizCATdai7D15JHy2sJ7GafuQbq9vnD75DngE1yNA260VmP9UQ/M9jB9dScaLw7kOdsiykptRz1LJ36THPg/A4uUtSl+GM8AAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\frac{2 \\left(-1\\right)^{k + 1} t^{2} \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{2}\\left(\\frac{k}{t}\\right)}{k^{2}}$"
      ],
      "text/plain": [
       "      k + 1  2     ⎛k⋅(x + 1)⎞        ⎛   k⎞\n",
       "2⋅(-1)     ⋅t ⋅cosh⎜─────────⎟⋅besselk⎜2, ─⎟\n",
       "                   ⎝    t    ⎠        ⎝   t⎠\n",
       "────────────────────────────────────────────\n",
       "                      2                     \n",
       "                     k                      "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Pka=(2*t**2*(-1)**(k+1)/k/k*sympy.cosh(k*(x+1)/t)*\n",
    "     sympy.besselk(2,k/t))\n",
    "Pka"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Show that the pressure for antiparticles is correct:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAAoAAAAOCAYAAAAWo42rAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAz0lEQVQoFXWS4Q2CMBCFhQkIbqAjqBvgBsoGOkf/GUbQFXQENjAyAhtA2AC/V3tGG2hyeXdfH71LSzKO48KWc64KeYeuiQrWiiVmBLyoL+hDG2iGiO3J2zTAM5qZKbAB1UdX1d6IHolGIFpP6kKnm7EA9JFJpZ8PLdIwy4TnD+U6MQ9IM82tb+s5g/GlTpyazQzWrdOM1lL3Fi9jn3tktyZWsYvaTqzteu7A7YRxA2vU1RtJboAePZiZXG1L4iT2+9ba0E8xEPopdoTe3r/YGx/SQ0OZAIYmAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle 0$"
      ],
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Pka2=(Pk+t**2*(-1)**(k+1)/k/k*sympy.exp(k*(-x-1)/t)*\n",
    "      sympy.besselk(2,k/t))\n",
    "Pka3=Pka2.subs(sympy.exp(k*(x+1)/t),2*sympy.cosh(k*(x+1)/t)-\n",
    "               sympy.exp(-k*(x+1)/t))\n",
    "sympy.simplify(Pka3-Pka)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Number density for particles:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWIAAA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3HjDMrB4u/xHcY6s8W97gsGNRphnDPcpPnNvPqepNG3hMVOfb+8+1EUY429d1OPFIJ9aBeepLoA0pzIaGkKu/3EJrCQBN8QrCdq7KUtAxg9jiyHkONpJzxhhwI6ncUSN/+iLJ0wehhh8AAPLJxZT+ETl4PDfl/kv1/xX64CjO3FmTmdg2IkvWz598l9p3tHl4BJYXQIemlhd5N5hJgE8WIB/HRXSuvOdZgx0epICg0w5d7ueRaOqrGDEKccAAxhujsalH5d/GEre5KfeL/n05+AS2EQCN5v06p26BN5KIMSH9YgRfSXDGQyk7pyGaF7G6bnGW6U+sWaMKoYYjzkF86TzExj046cvUkl5elUJuEe8qri9s4IEMMB4vhhD/lehGcsC6nAWRjhi0OZJz6nXSxZGn392anjkAfx34Rw3FPgfl8AaEnBDvIaUvY+iBGQQzXPlf/fhvRKn/V3p2cY4dsRLuJKHi4FuGVz1RR50WIyatINLYFUJuCFeVdzeWSYBPFHAjKP9co6wwklGcu5/Ei8ZXDP6FkOmC4AFAC+Zl3f0azRR5uASWEUCbohXEbN30iOBvlCBHUd7t6deb3Y0phjdFxlSMLAqN6NvxeBaHqGRPH5seH53CSwmATfEi4nWG66QAEbwueHJCN4qzZEyDCLecFNmOBV3vNrST5/pq2Rk+XEIpyvoL4QndHdwCawqgf8DdGGtFoGp6ZAAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\frac{\\left(-1\\right)^{k + 1} t \\left(k K_{0}\\left(\\frac{k}{t}\\right) + 2 t K_{1}\\left(\\frac{k}{t}\\right)\\right) e^{\\frac{k \\left(x + 1\\right)}{t}}}{k^{2} m}$"
      ],
      "text/plain": [
       "                                                   k⋅(x + 1)\n",
       "                                                   ─────────\n",
       "    k + 1   ⎛         ⎛   k⎞              ⎛   k⎞⎞      t    \n",
       "(-1)     ⋅t⋅⎜k⋅besselk⎜0, ─⎟ + 2⋅t⋅besselk⎜1, ─⎟⎟⋅ℯ         \n",
       "            ⎝         ⎝   t⎠              ⎝   t⎠⎠           \n",
       "────────────────────────────────────────────────────────────\n",
       "                             2                              \n",
       "                            k ⋅m                            "
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nk=sympy.simplify(sympy.diff(Pk,x))/m\n",
    "nk"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Show that $n_k/P_k = k/t/m$:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAABoAAAArCAYAAABmbJjGAAAACXBIWXMAAA7EAAAOxAGVKw4bAAACi0lEQVRYCe2X3XFTMRBGrzMpIEAHoQN+OiAdMKECSAfk0X7LJB0AFTChg9ABSUpIBwR3YM6RJY2si23pwXlgvDPrXa1W+61WmuvVZLFYDC00m82O8LuG38CPjF+2rEs+B0nZJgk8h0/we4B/bvOv55uBioWv0G+KcZPaBcSO3sWoO9+RpbOE86ZtFE6Hhd6iuqO8GwDfM34Le1HONyXQXDqCGCyfTwTBNHyBTyM7/ic1A7E6nw8gQUf+wG4CW29iT+nC+UTAW0BCCZH32F7DG6l3R2Zu0DMALGMzNQER1PIcwxfoZ0i/EHc9YE1ABPWwpXTjbpfDAD4A+DmO14pWIM/nnoDzKpKllF4sxfrfViBLd5HCRMBzxp6Vu8lzyaeWk9avd72wd9y6o964I/890KgkrYZ96VorNfJ7stJNptNpW781yrHPsP8y9NWr8H6yy/D/AfV0QUXFN6v8GfpHeQefoId/4V2Vzr7vGH6EA+0KKDxv4l/+ToHckV1spvBlANkJG0Ib9o/wc9j+7Tdsdjf4XMH6fIAl9UtsqWM1hms8H3Xtdk2/XJuAXOBrwAdWnkQfsLnwD2yQB8YpsC+Jb4yfITMx1n6NnGQjygEG0dMLzgM8wnZVOLk7SXtqIB1rN4maQg9YGw8x2LD7uHKRQGZekiWSvi5F/rUHt8GvycRXzkcHd2SpJB0GxmXWmkKGhZ82yTZ5xReflGyqUHD0p7zeHvK6DOuAJmVQH2Empy6Nkk1zJZBOdcB1GVpee3Evh+VOj4CV82HOi+H8ckfR2aDfNRYUAjC/kgDz+iab/Xc6Py9I+ORgC0kiQ5XSjkQ1u7p0OqcgqJku0byFNvihfHHGxl/7J+QpMt/ev1uE19AECqmMAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle \\frac{k}{m t}$"
      ],
      "text/plain": [
       " k \n",
       "───\n",
       "m⋅t"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sympy.simplify(nk/Pk)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Compute entropy:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA6sAAAA0CAYAAABsOq6OAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAckUlEQVR4Ae2d4bXctBaFL1m3gEuo4EEHIakgoQMIFSR0QNb9Bf+ykg4gFYTQAVABIR3AqyB5t4O8/elaRuOxZ2SPNLZnttbSWJalI2lvHVnHkj2ffPz48cLOCBgBI2AEjIARMAJGwAgYASNgBE4PgR9//PEntepzHb8aap2uPdK1Dzq+G0pTI17lfS+5P+t40yf/Tl+k44yAETACRsAIGAEjYASMgBEwAkbgJBD4Ta34Z6glMhTv6RrG7GRDVXlfDMknXteR/5v8VZpO5y91Pph3lcaqGvVU/m95LHE7I2AEjIARMAJGwAgYASNgBIyAEehHgBXVv/ovhdgXsqt+3nE959KGEZpmkGyM4WAQp/FJ+I3SPE3O2+BlG1pRADDlscAnW/8raq6ragSMgBEwAkbACBgBI2AEjIARmIrAfWXEIP1cx68RojArmhyJ27KpFI9xSb4v5N/Ls033S8V/p+MopzzIf6dj7wqq4n+Xf6M0WwbzWo1VQL2iYaOQcuKiCAh/noA8k/9J4dDhixZgYVUQMG9VYK0u1LxVh3gVBbg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YzrfkGYcnbJDZn8YwSMgBEwAkbgHBDwNuBzYNltNAJGwAgYgRwEMFJZQcVg/E7GZjQoc/JupMFQbSKQeaHzdPWUKAzjd0k64nBsN+6mDRf8YwSMgBEwAkbg3BCwsXpujLu9RsAIGAEjsIWAjEa23rIC+lxhVkF5b/QvhScbrMqP48NJfSulGLEbRqnKIo568N7qhc69HRgg7IyAETACRuBsEbCxerbUu+FGwAgYASOQIMCKJi4akG9vT4MBi+E49T9U+4zSaBjHd1qbosJWYVZbeb8VwznWKV730QgYASNgBIzAWSFgY/Ws6HZjjYARMAJGYACBoW258Yu/nw3kG4xuDE4M09edRMEI1fVoGMfLpI1xbEPuvs8a0/loBIyAETACRuAsELCxehY0u5FGwAgYASOwBwEMxecxjQzFG4X5KxmMRlZV22sxTcaR1VFWSbvbgCmrzxB9oXi+Dkx5YSuwjnZGwAgYASNgBM4Wgf8De7CYaln41k0AAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\frac{\\left(-1\\right)^{k} \\left(k^{2} x K_{0}\\left(\\frac{k}{t}\\right) + k^{2} K_{0}\\left(\\frac{k}{t}\\right) - k^{2} K_{1}\\left(\\frac{k}{t}\\right) + 2 k t x K_{1}\\left(\\frac{k}{t}\\right) - 4 k t K_{0}\\left(\\frac{k}{t}\\right) + 2 k t K_{1}\\left(\\frac{k}{t}\\right) - 8 t^{2} K_{1}\\left(\\frac{k}{t}\\right)\\right) e^{\\frac{k \\left(x + 1\\right)}{t}}}{k^{3} m}$"
      ],
      "text/plain": [
       "                                                                                                        \n",
       "                                                                                                        \n",
       "    k ⎛ 2          ⎛   k⎞    2        ⎛   k⎞    2        ⎛   k⎞                  ⎛   k⎞                ⎛\n",
       "(-1) ⋅⎜k ⋅x⋅besselk⎜0, ─⎟ + k ⋅besselk⎜0, ─⎟ - k ⋅besselk⎜1, ─⎟ + 2⋅k⋅t⋅x⋅besselk⎜1, ─⎟ - 4⋅k⋅t⋅besselk⎜\n",
       "      ⎝            ⎝   t⎠             ⎝   t⎠             ⎝   t⎠                  ⎝   t⎠                ⎝\n",
       "────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
       "                                                                                 3                      \n",
       "                                                                                k ⋅m                    \n",
       "\n",
       "                                                   k⋅(x + 1)\n",
       "                                                   ─────────\n",
       "   k⎞                ⎛   k⎞      2        ⎛   k⎞⎞      t    \n",
       "0, ─⎟ + 2⋅k⋅t⋅besselk⎜1, ─⎟ - 8⋅t ⋅besselk⎜1, ─⎟⎟⋅ℯ         \n",
       "   t⎠                ⎝   t⎠               ⎝   t⎠⎠           \n",
       "────────────────────────────────────────────────────────────\n",
       "                                                            \n",
       "                                                            "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sk=sympy.simplify(sympy.diff(Pk,t))/m\n",
    "sk"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Compare the computed entropy with the expression in the O<sub>2</sub>scl documentation:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcMAAABACAYAAABm1RwcAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAYEUlEQVR4Ae2d7ZXdtBaGh1lTQEg6CB2EpAJCB5BUkNABrPzj3yxuB5AKEtIB3AoS6ABuBYTpIPd9NNoe2ZZt2cc+ts/Zey2PbX1uvZL2h6Tj+ezTp08XTttH4Mcff/xZXD7U/esubhX3VHEfdf+zK80S4arve5X7i+43S5TvZToCjoAjsDQCl6UVSND9HIVeaRZPNy8Cv6m4v7uKVN88UhzKcrIiVN6fusonXPGU/5uue2k6vf9H77150/T+7Ag4Ao7A0gggp3T90ZRXXfUWKUMVhuX/WHeE3q5JbXip66/YptnaovIAnrL/mK3QekF4hH1l/6S6f6lnGf1WU3JpbpWNsg0KNw1Pnn+l/cm7PzoCjoAjsBoCkkesVL3R9WsJE4PKUAWy9IbV/21JgVt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sMaWPMwHcv3TvcX6c7x46AI+AIOAIRAemxh3pk66/zLEynMoxlkJH/eUdBTo6AI+AIOAKOwB4RwCt8J11mHxtptaFXGcaMuJR8F9PJEXAEHAFHwBHYFQLSY3iE/Mj+RR/jrR/d5xKrML7QHv5bei7ewxwBR8ARcAQcga0hIN3FqiYfkvlKz9UP7HN89nqGSYZv9Zz9F0JJGn90BBwBR8ARcAS2hACrmj8MKUIYLlKGKojfHvJhUydHwBFwBBwBR2DzCEhv8VMKFGHrN4U55v8PHFfgoIlN6QAAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\left( \\frac{\\left(-1\\right)^{k + 1} e^{\\frac{k \\left(x + 1\\right)}{t}} K_{1}\\left(\\frac{k}{t}\\right)}{k m} + \\frac{nk \\left(- k x - k + 4 t\\right)}{k t}, \\  0\\right)$"
      ],
      "text/plain": [
       "⎛           k⋅(x + 1)                                       ⎞\n",
       "⎜           ─────────                                       ⎟\n",
       "⎜    k + 1      t            ⎛   k⎞                         ⎟\n",
       "⎜(-1)     ⋅ℯ         ⋅besselk⎜1, ─⎟                         ⎟\n",
       "⎜                            ⎝   t⎠   nk⋅(-k⋅x - k + 4⋅t)   ⎟\n",
       "⎜────────────────────────────────── + ───────────────────, 0⎟\n",
       "⎝               k⋅m                           k⋅t           ⎠"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nk_old=nk\n",
    "nk=sympy.Symbol('nk')\n",
    "skalt=(nk*(4*t-k*x-k)/k/t+(-1)**(k+1)/k*sympy.exp(k*(x+1)/t)*\n",
    "       sympy.besselk(1,k/t)/m)\n",
    "diff=sympy.simplify(skalt.subs('nk',nk_old)-sk)\n",
    "nk=nk_old\n",
    "skalt,diff"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Compute terms for energy density:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/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VU3/ryE//19RVotKE97u5v/dr6In7itYRLpgcAaEQhnvUbWQudA4AMC/DlGe+XciY2cNtvfjxT545O0Jd6ZMRIDgUDgLBGIt8HPkpZQKhDoR0AO90HO4fqvZuXnD0/uK7IiP8k/6vVbFHcDgUCgD4Fw1n3oxL1A4HwR+FKqvZPjrf3RyZ7mOS9/mPCjzqt/PbpXMBICgUDg5AjENvjJKQgFAoFJCLCyblbVcr48i+ZrWbx89h2OWZHzfxXv69yeXZtz5+U0S9NphEAgEDhnBGJlfc7shG6BQAcC2QmzMv6D27rGURP4G8qHOZKOY+bN7/I/wXHypP+mGCEQCARWgkCsrFdCVKgZCBQI4HAJf8ohp3MdXyjiwHHMzYpb5/zn91Pde6MjgdX3XV3bCjslxkcgEAicNwLxRx7nzU9oFwjsISBHaytonj+/0nVsZ++hFAmBwLYQiG3wbfEZ1lwGAqymWUHfVXwiZx0vi10G72HlBSMQzvqCyQ/T14eAHPMtaX1bkd/3fqLj74p/hcMWChECgQ0jEM56w+SGaZtEgBfICPZc2n7BDAd+Jacd36EGiAiBwMYQCGe9MULDnM0jwPerX8spt18Qsze++e3vCIFAILAxBMJZb4zQMGfzCLAN3vzEaHbavGjGs2tW1c29zSMRBgYCF4TA/wGSTDPIhzQLfwAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{\\left(-1\\right)^{k + 1} t \\left(k^{2} K_{1}\\left(\\frac{k}{t}\\right) + 3 k t K_{0}\\left(\\frac{k}{t}\\right) + 6 t^{2} K_{1}\\left(\\frac{k}{t}\\right)\\right) e^{\\frac{k \\left(x + 1\\right)}{t}}}{k^{3}}$"
      ],
      "text/plain": [
       "                                                                           k⋅(x + 1)\n",
       "                                                                           ─────────\n",
       "    k + 1   ⎛ 2        ⎛   k⎞                ⎛   k⎞      2        ⎛   k⎞⎞      t    \n",
       "(-1)     ⋅t⋅⎜k ⋅besselk⎜1, ─⎟ + 3⋅k⋅t⋅besselk⎜0, ─⎟ + 6⋅t ⋅besselk⎜1, ─⎟⎟⋅ℯ         \n",
       "            ⎝          ⎝   t⎠                ⎝   t⎠               ⎝   t⎠⎠           \n",
       "────────────────────────────────────────────────────────────────────────────────────\n",
       "                                          3                                         \n",
       "                                         k                                          "
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "edk=sympy.simplify(-Pk+t*m*sk+(x+1)*m*nk)\n",
    "edk"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Replace K<sub>0</sub> with a combination of K<sub>1</sub> and K<sub>2</sub> and \n",
    "define\n",
    "$$\n",
    "B_1 \\equiv K_1(k/t) \\quad ; \\quad B_2 \\equiv K_2(k/t)\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "edk2=edk.subs(sympy.besselk(0,k/t),sympy.besselk(2,k/t)-\n",
    "             2*t/k*sympy.besselk(1,k/t))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Show that this substitution works by computing a numerical result:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAAVCAYAAACkLIL4AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKL0lEQVR4Ae2c77EcNRbFB5cDMJABm4G9zsBkYO9GYJPBUnyyv7kgA9gIFpOBIQIWZwAZ2LwMds+vR3dQ90itc/s988pDq0pP3dLROdK9+tOtHvuj58+f/+twOHyhSHjy4sWLN8fL/e9ugd0CuwV2C1yqBbTWz9b+j7QZfK3OvlbBj5fa6Va/1N/7y41P9/eE/UTpb606a3mq85nKHyl+r+urNSxlwgz1XU4XN2pTXf4+OGv+teustvBDW67p7WVzC9y0PTP+dLSTfKl5ObfE+V1G+7z29XMy+o4taZFw0x5wd615BQTkreLfFL9Wnr1QbqmvOvel84XSeFvR7Xno4ZTPgv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5vzgrYP7Slf8sCQmhcQG2NpqA1PBIMvoI62NY6D0NQechae1LygDYZ+ypZw9jYDFmJ2q2V4oAzOv0aLiFOfiUGcBXH/rgx+khXHO5RbONqlyEbSekJjkQ6e74Q5LeAIlMAgD8xBGK5P9wFSfquNUYwTCK3N5liiD9yOfoCVOpzAHRy+w75LH0bdZX8jv9cfiw+9Eh3/0BfCSBuMbUvpNycdJGZwxvUalVM/M+aWvjqoj2djM2n3oT3Fl2ljbY+RP4faNZmuR3w1fIS1xnFFOOIDOuQsvnHXrUp+2PesLQ93ava4VgP5Nc47pY+rvHu6/ofi0zpPmP8pTjtglW/VD/wiRYc4Ci0cG8jZubfax5kcr7+xSfD/B82+VeieX9YQ6k3omHP+t6UdqGj7VWQ00qy+w4mMg2MT5G3rFNR3/ExdPggu2z3izPC5/om2jbTBWbZUv+Di58azsRpCTqq61rhGS/FDnBeYwbJnx17YOHzWgkTZVatQeVntEV8tM8JmxjG8Iz4wLmd2Xjj6WVseuv9rKQNairwdXCm+VXyo+FL5s+MP3f+qfJ40+ZhxCm79qCA8izPHKzydEzjW+Vn530x35c8Ip3KOmb5SrJ9k2SBmT1G6RwtnETgeAs+HZ/rbDCobtrHwsuA81TV9aIaCs/STnI42Nq43PWzBv5Se2YiGO9rCZPgs/7jaFW5oS7WTsUp4oOuun4+Q9l/Vu+h5Qa/Vx9TcEH44Lyre1fGZ0S7YVb7wooMVJjOOsdFQ2+UUzp4XN21LabPOv+5uBmHEPd0tcEkW0MDnLah1THZJ3dz7slvAtkBsBnfsGjtwt8BlWIAPn5veCi6j+3svdgu0LbBvBm277LkXaAFtAhzxvL3Aru1d2i1wbQvsm8G1TbgTfEAWeKYNYfYN6gNq+97U3QLv1QLxzSB+NfREk2X2gfi9qu/kuwV2C+wW2C1wKxbQWh//Nxk/oHnyfx7Mozd4+7dmAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle \\left[ 0.0448547577373875, \\  0.0448547577373875\\right]$"
      ],
      "text/plain": [
       "[0.0448547577373875, 0.0448547577373875]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[sympy.N(sympy.besselk(0,2.78)),sympy.N(sympy.besselk(2,2.78)-\n",
    "             2/2.78*sympy.besselk(1,2.78))]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "For convenience, replace with B1 and B2:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAARIAAAAzCAYAAABbsIcEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAANRklEQVR4Ae2d69XdtBKGd7K+AkLoIHQQvlRA6IBLBSd0ACu/kn9Z0AFQQYAOOKcCAh0cqICPdBDeR1tSZFuy5du+2DNreVvWZTR6NRqN5Mu+9+7du4ORIWAInB+Bly9ffi8pHun8aUkapT1V2p3Of5TyrBGv+r4W3x90fpvjfz8XaXGGgCFwFgR+Va1/lmrWIH6sNAzNZCOist+W+BOvdPj/quNBmk/X3+m6WPYmzXwtYTXqmWT9Rsf3voGLiO7B+0LMvlL440WYGhNDoB4BPJHfe7J/K70seis95dKkhoFIE8TbGSrFPUrjk/DPyvNMxw9JnAteqyHBxcI6Vltm5cfofNUGIFwrDRBxG6Ei2Mdk+zUEVkHgVlwxFgzkz6hBYTwBzsR19F3x6C3lPtLxtw6WHh8rvqjrSs+SysD/D52znofi/6vjZ+XpGJKrXNqoMYD6gIZlEclHUqZI4gWAdFrRtSwWtgRDYBkEMAoQZwZr6n0Q938dbbqV3pL3tY5PfRhjshZlJ9mr9EiEEJ6DMyICDgOB9f5QYZY7RobA1SEg3Q1GBG/gP7rGGKSG5KGu79oNU77gHTAm2GM5KC6OA4Xhlw7+p4pjUzcQy5UxEzJydOhaDQkAsyGEEaEDAPMvANJhHoXAMLo6BDAEeMQM8t+lx+zRPUz0+Y2uydMgpX+tg3KMCWdAdB33MRSORoW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PrSlnNXCOhZCp4Mfe4b/cifc58r3BUu1tjDwQyJacEYBGo/VziGp+XdAAK2tNlAJ85tAp6GDt5o/UdHeOU9x5ZP9vEuTyBeQOSt3/ASXIi3884QMEOysw7PNVeGgO+S8G4VryXEb4Bk8vL+U/iqWibZovaKgC1t9trz+XbjWbzKJ7l3sNofn8KwtD9XWCpu8RtGwDySDXfumKYlS5Y+jySy9MuZ3OcKYx4L7AcBMyT76euhlrK0YYkz+IEi5XmkvOyP5D5XOFSPpW8QAVvabLBTJzaJTdTojchY4G3wMXBu+cb/qvVGhGv3vRp/fdB50599EAZGPQiYIekBZy9JMgIYC/ZH+HAPRgEjAnEd/w9Y8XgixM39XKFYGG0JAVvabKk3p7cFbwRq/B+wrjEw6Z0cjAp5g3HhzC3hweWQ8hltGAF7aW/DnVvbNBkCvAz+PItPNcb/E64tb/kMAfNITAdAAC8Dz4M/fuI/buwBMwFhVI+AGZJ6rDaZU0aD5Qt7H5f0f8CbxHrLjTJDsuXerWtb3/8BH2Ro+Bi3kSHQi4AZkl54dpHIbVz+QLy9YRpu557j/4B3AfyWGmmGZEu9Oa0tLG3iY/HeoLDpyl4J3khMm8beSu0BgX8B1AwWYQo/Mt8AAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\frac{\\left(-1\\right)^{k + 1} t \\left(B_{1} k + 3 B_{2} t\\right) e^{\\frac{k \\left(x + 1\\right)}{t}}}{k^{2}}$"
      ],
      "text/plain": [
       "                             k⋅(x + 1)\n",
       "                             ─────────\n",
       "    k + 1                        t    \n",
       "(-1)     ⋅t⋅(B₁⋅k + 3⋅B₂⋅t)⋅ℯ         \n",
       "──────────────────────────────────────\n",
       "                   2                  \n",
       "                  k                   "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "edk3=sympy.simplify(edk2.subs(sympy.besselk(2,k/t),\n",
    "                              sympy.Symbol('B2')).subs(sympy.besselk(1,k/t),sympy.Symbol('B1')))\n",
    "edk3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Number density of antiparticles:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAasAAAA8CAYAAADYBZUiAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAVgElEQVR4Ae2d7bXUNhPHL5xbQHLpgHRAoAKgg7xUAOkgOXxKvnFCBwkVQNJBkgogdJA8FSS5HfD8f0Iysldvflv77s6c47Utj0aj/4w0kqzdvfX+/fsLI0PAEDAEDIHtEPjhhx9+Uum/6fzrdlocr2TV8xOV9oeOh7q+bin5dguT8RgChoAhYAisg4APVFfnEqhA0QeoJ7r8U9cEripZsKpCZAyGgCFgCKyDgDrqp5J8X+cv1ylhv1JV53fS7kcdL1u0tGDVglLEg3Pp+EvHt1GyXRoChoAhMAoB9SH3lIHO+uGojAVmyfxCx90Cy+qPxvSN4v1ZCn2C3jXFLFjVEBo89+BeKZlRgZEhYAgYAlMRYEbxs/qU7DsbPWseHMMredc6/z1VodZ8KoMAg25/DvMo7YUO3sG1ErPKl8pTXA60YNUKp+cToIxaMNTvI7MauyFgCBgCDgH1H8wkmFk9L0EiPmYe1cGx+OjoHy/RL0lGMdDoOXoTGCkzF2B+ER+zxiqJ71pMr3UUlwMtWFWhPGB4pBQXqATyXR3fthrlQNKIBJXBKIaybzyV6uKfNS2zirfYqG48UDuowDFtdWb2pCNnBkJHnSU9bx0cI2+p9kCZWZJO73S8EEN2Bqfn9JGPdM4Fs6F89C8uYVqwGkJWv38sFraYYlBGGIx8CCRFA4tnMkk2o7DPdb7xs7laXfS8aSTpwfxR/L9NBtYyFhHYwFZnYU/hSr9Bf1GcVXnjtA6OCQwH/YPSGExz/KQjDK7dddH4yzx0AatFlHQj8MH/TY5/l8EKUHMKr5neWG6Y3dwT/686GBnxXYHsKGOOzpLLyOSZzlkjzpF/zLwtdREPtm9aZhUvmL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Kc0uBOhsZAiePwP8BJHIhurSZCjMAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle - \\frac{2 \\left(-1\\right)^{k} t \\left(k K_{0}\\left(\\frac{k}{t}\\right) + 2 t K_{1}\\left(\\frac{k}{t}\\right)\\right) \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)}}{k^{2} m}$"
      ],
      "text/plain": [
       "       k   ⎛         ⎛   k⎞              ⎛   k⎞⎞     ⎛k⋅(x + 1)⎞ \n",
       "-2⋅(-1) ⋅t⋅⎜k⋅besselk⎜0, ─⎟ + 2⋅t⋅besselk⎜1, ─⎟⎟⋅sinh⎜─────────⎟ \n",
       "           ⎝         ⎝   t⎠              ⎝   t⎠⎠     ⎝    t    ⎠ \n",
       "─────────────────────────────────────────────────────────────────\n",
       "                                2                                \n",
       "                               k ⋅m                              "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nka=sympy.simplify(sympy.diff(Pka,x))/m\n",
    "nka"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Compute nka/Pka:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAI8AAAA8CAYAAABfPelIAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAJ3ElEQVR4Ae2d23UUORCGxz4OwJgMTAZcIgAyWCACIAM4PMEbBzIAIuCSAWwEBjJgN4JlnQH7fxqVLHWre9T0jGd2pDpH6NKlklT1q3SZbnPw69evRaO+Bl68ePFGpZ8Vf+o/3b8SjfNYo/pT4bbS5yUjPCxhqo3HA+ekFuBgXw+Yh0p+UxograQGno6KpLhHKrqp+F7n0d5nNebvGuQrhXclg23gibQk5V33yrsdFc9KSuYfCqezhKyhsvrwpESM+N6K75h+r+Jv4Ek1xIx7K8WNrvl6/kjhh8KoQeCTvHPFf6XNbCandjA6ffv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/qpg0Zip9U+EWfe6nqSXrgXo67tStDymiex2tGSuJSlBe3trrPGDLUFsq5hH041m4DT6odAMSLa1WT9zrc7YzeNTXwRDCRstxLZYpZ66skjf1UA8frDL2bHfTSwBNUERK3leKmFyVWRRozF6Xc6fD1avaEFSukgSfWhtJSGiccjqj80Lsrt86dXm4sy5UFH2+OLlfWegOPaSKKpTxmHW67Gu/jJwrACe+DRyrJJttRPauWVliigeZ5SrTUeLIaOHj+/PlvfxGQldgKq9FAW7aqMfX6B9qWrfXrtBqJDTzVmHr9A23gWb9Oq5HYwFONqdc/0Aae9eu0GolH1Yx0QwP1N7O8RM/fc1z5e9CGurEVsc3zzFc7bx+eKvS+qJwverclNPDMtw8/oma/a5overclNPDMtw+ep+hX6PlN7ZaE6m6YtS/B2LxqypeQvGZ5osD38P8o4EX4e8evFeB5oACR5hdn9wmKl0EdXtlAHuW8ynFGXcVVUI3gAQS87MVLT4nBVQYY3N9lVMxSZGDhe23+/6nkZXDl3Xfcikv/upbE7A9VtWzJyHgJ+/qRTS6f28SeAi8EUR5/6EY5wOoSnir7KW6XcR/zR/s4qJEx8bcWzxUAAuCxP99iVVieoO4LUXyOkwMJYKxyv4OSavM8LFMQRl90vAtFzpMAMDIR8TVp7ImoawA0Txax15GsCjyRSdkID3mSLkgAGkDha04DDckeAD2geFYF1QoeDN8FyZAnYWnjT+6xgWaps2/ak/2OnrF55nk1VB14PAAACn/SNyYHCj1PQCUGeK2MP7Nn+yE20e7nCJU54CnOebO4jb1KVwceWQ/vgBfpGhoAGDBiI/MNO6cvvt12S5d/yNellPOB4H3F8anNs+x39B+3/WeS+HAaXwAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{k \\tanh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)}}{m t}$"
      ],
      "text/plain": [
       "      ⎛k⋅(x + 1)⎞\n",
       "k⋅tanh⎜─────────⎟\n",
       "      ⎝    t    ⎠\n",
       "─────────────────\n",
       "       m⋅t       "
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sympy.simplify(nka/Pka)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Entropy of antiparticles:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABvkAAAA8CAYAAABM39bUAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4Ae2d67XkNKKFD706gKaJ4EIG0EQAZMAjAiADWP1r+NcLMgAi4JEBMxEAncEwEQxzMui7Px+p2nbJtuTy21truWzrrU/akmzZrjdevXp1Z3MbgW+++eZ7xfCb9r/eFpNDdxE4G2OV94lY/EvbBzq+7+JiexPYIgHrdYu14jyZQD8B67afj11N4MgErP8j167LdkYC1vQZa91lPgMBa/sMtewynoWA9XyWmh5XTrWP4nWBR+OScqhIIIjyqfZe4ItQJt6fkbHKzMLe59r+1DHCtjGBXRCwXq3XXTRUZ7JBwLq1bhsNwienImD9W/+navAnKKw1bU2foJmfsojWtrV9yoZ/0EJbz9bzUNNWGyleF/Ai3xDVHncB/0LOz7T/pMebnW4gcGbGKvtLoftW2483IHRQE1iMgPVqvS7W2JzQZASsW+t2ssbkiHZHwPq3/nfXaJ3hXgLWtDXd20DsuFsC1ra1vdvG64xfEbCereerRtFhobZStC5wqkU+hKTt39q+6uCXba043pVnFmA+yA5kj0UE5mCsOD/W9nZRRib2rPSz25/8/qDkn5DvibPh6ExgUgJqo5P3ibR7bdbrpDXlyEzgNQHr9u5ODDzOvm4SPjoRgaPqnypU2bLm2tb/iRr8CYp6VE3n6jlo32P6Cdr62YpobXu+frY2f+TyzqFneCne3dw7U149Vhc08hJeZ1vkoyE91cZK6K2Gt6t+EGxen7SZh0AWY9VB1uIt/pTNe+3/mie7r2NVGizMka8/X9s+HMnuO238j2Ou4U3RHxXGn+3MJWZ/axAY1KvacJZWyTx+tbN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vhUDf6ZzdAtywCUJWK/W65LtzWlNQ8C6tW6naUmOZY8ErH/rf4/t1nnuJmBNW9PdrcMueyZgbVvbe26/znuTgPVsPTdbRO9Z0bqAF/l6WQ47Spy8YcWnFP023zCuUT7OyFhl5i0+Fviqz8KOAudAJrACAet1BehO0gRuJGDd3gjQwU1gxwSs/x1XnrNuAgkC1nQCiq1M4AAErO0DVKKLYAKBgPXspjBEQG2keF3gjVevXg3Fa3cTMAETMAETMAETMAETMAETMAETMAETMAETMAETMAETMAETMAETMIENEfCbfBuqDGfFBEzABEzABEzABEzABEzABEzABEzABEzABEzABEzABEzABEzABHIIvPGPf/zDr/LlkLIfEzABEzABEzABEzABEzABEzABEzABEzABEzABEzABEzABEzABE9gIAX+ucyMV4WyYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYQC4Bf64zl5T9mYAJmIAJmIAJmIAJmIAJmIAJmIAJmIAJmIAJmIAJmIAJmIAJmMBGCHiRbyMV4WyYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYgAmYQC6Bx7ke7c8ETMAETMAETMAETMAETMAETGCbBL755pu3lbMPtf2tjeP3tb2Q/UvtbUzABEzABEzABEzABEzABEzABA5IwIt8B6xUF8kETMAETMAETMAETMAETOB0BL5Vif/Sot4PlFz7r7T7l7Y3ObcxARMwARMwARMwARMwARMwARM4HgEv8h2vTl0iEzABEzABEzABEzABEzCBAxDQQt0TFeMXbc+0/a3zd3qK9aLl9hZhWnY+NQETMAETMAETMAETMAETMAETOBABL/IdqDJdFBMwARMwARMwARMwARMwgeMQ0KLevUrzkfZ/av9HX8nkp/1Zzo/ln7f7bEzABEzABEzABEzABEzABEzABA5KwIt8B61YF8sETMAETMAETMAETMAETOAwBN5VSdpv6iULp8U+PtP5mbbvdVx9ujPp0ZYmYAImYAImYAImYAImYAImYAK7J/Bo9yVwAUzABEzABEzABEzABEzABEzgoAS0UPdhKNo/c4oo/9/J3wfaeAOQBT8bEzABEzABEzABEzABEzABEzCBgxLwIt9BK9bFMgETMAETMAETMAETMAETOASBj1SKey3Y8enOLBP8fi3P3+qYtwBtTMAETMAETMAETMAETMAETMAEDkjAn+s8YKW6SCZgAiZgAiZgAiZgAiZgAochwJt8l7f4tGjHf+29r+2Jtq9Z0NPG8X+0faDj+N98cVHwmewrO7kRF4t+hP9c21NtX2r7rzYWE3+Tn++04YdPfmI4ZrHwkofK1j8mYAImYAImYAImYAImYAImYAKrE/CbfKtXgTNgAiZgAiZgAiZgAiZgAiZgAtcEtLDG4h2LbL/hqnMW+DDfa/s0bNizoPe3tr+0RcOCHvY/Rwvt+YQnn/Mk3h+1faxzFgqx+0Qbi3lfaP802PM2IGn9os3GBEzABEzABEzABEzABEzABExgYwT8Jt/GKsTZMQETMAETMAETMAETMAETMIFAgIU6zD+16FYda/+rNhb+WNCrv13HIt1zufFWHoa39d7TOQt9d9oTvlos1P5tbX/JjsW9aJ6Ggyeyr8eLPYuCNiZgAiZgAiZgAiZgAiZgAiZgAhsj4EW+jVWIs2MCJmACJmACJmACJmACJmACgUD1f3w6ZoHuj7j4pj2f33wv+Kl2wS5+qrPuFI8JHz/tySIfn+msGxYOMT887C6/pNMX78WjD0zABEzABEzABEzABEzABEzABJYl4M91LsvbqZmACZiACZiACZiACZiACZhALgEW93hjj4W2L7VIFxficsNf/LHAF06I807n9bf1sGJB8WXNH3YYPgva9ls5+McETMAETMAETMAETMAETMAETGBdAl7kW5e/UzcBEzABEzABEzABEzABEzCBKwJabOMTmbxx90LHvHXH/+L9qePRC30Kj/lMW+rNPBb/Got5Sgs78sH/8t3p3J/tBISNCZiACZiACZiACZiACZiACWyEgBf5NlIRzoYJmIAJmIAJmIAJmIAJmIAJ1AjwBh0mLrz98XBaLfyx4PZVOC/dpRbz4oJi/M++GCeLi7zdx//3seAY8xTdvTcBEzABEzABEzABEzABEzABE1iRgBf5VoTvpE3ABEzABEzABEzABEzABEygg0DX5zP5fCfmrYdd/m9YqGNB76dWqGrxTu5xQTE64zfa8bnQ9v/1RX/em4AJmIAJmIAJmIAJmIAJmIAJrEDAi3wrQHeSJmACJmACJmACJmACJmACJjBAgAW2F9GPFtjudfy1NhbbeIvv4hb9ZOx5G4+38tqf6ySt1ALet7J/EtKrPtmZkYa9mIAJmIAJmIAJmIAJmIAJmIAJLETg/wEhKv3lE+r7NQAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{2 \\left(-1\\right)^{k} \\left(k^{2} x \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{0}\\left(\\frac{k}{t}\\right) + k^{2} \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{0}\\left(\\frac{k}{t}\\right) - k^{2} \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right) + 2 k t x \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right) + 2 k t \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right) - 4 k t \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{0}\\left(\\frac{k}{t}\\right) - 8 t^{2} \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right)\\right)}{k^{3} m}$"
      ],
      "text/plain": [
       "      k ⎛ 2       ⎛k⋅(x + 1)⎞        ⎛   k⎞    2     ⎛k⋅(x + 1)⎞        ⎛   k⎞    2     ⎛k⋅(x + 1)⎞     \n",
       "2⋅(-1) ⋅⎜k ⋅x⋅sinh⎜─────────⎟⋅besselk⎜0, ─⎟ + k ⋅sinh⎜─────────⎟⋅besselk⎜0, ─⎟ - k ⋅cosh⎜─────────⎟⋅bess\n",
       "        ⎝         ⎝    t    ⎠        ⎝   t⎠          ⎝    t    ⎠        ⎝   t⎠          ⎝    t    ⎠     \n",
       "────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
       "                                                                                                        \n",
       "                                                                                                        \n",
       "\n",
       "   ⎛   k⎞               ⎛k⋅(x + 1)⎞        ⎛   k⎞             ⎛k⋅(x + 1)⎞        ⎛   k⎞             ⎛k⋅(\n",
       "elk⎜1, ─⎟ + 2⋅k⋅t⋅x⋅sinh⎜─────────⎟⋅besselk⎜1, ─⎟ + 2⋅k⋅t⋅sinh⎜─────────⎟⋅besselk⎜1, ─⎟ - 4⋅k⋅t⋅cosh⎜───\n",
       "   ⎝   t⎠               ⎝    t    ⎠        ⎝   t⎠             ⎝    t    ⎠        ⎝   t⎠             ⎝   \n",
       "────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
       "                             3                                                                          \n",
       "                            k ⋅m                                                                        \n",
       "\n",
       "x + 1)⎞        ⎛   k⎞      2     ⎛k⋅(x + 1)⎞        ⎛   k⎞⎞\n",
       "──────⎟⋅besselk⎜0, ─⎟ - 8⋅t ⋅cosh⎜─────────⎟⋅besselk⎜1, ─⎟⎟\n",
       " t    ⎠        ⎝   t⎠            ⎝    t    ⎠        ⎝   t⎠⎠\n",
       "───────────────────────────────────────────────────────────\n",
       "                                                           \n",
       "                                                           "
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ska=sympy.simplify(sympy.diff(Pka,t))/m\n",
    "ska"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Alternate expression for entropy of antiparticles:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdUAAABOCAYAAAB2b4zDAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAdSElEQVR4Ae2d3ZHdNtKGj6Z0/ZU8juDzZiBLEUibgS1FIDkDu3Rl36m8GdiKQF5nYDsCycrAuxFYntrrrdK+Dw4aAnlAEuTwb+Z0V/GAxE8DeAF0N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gxT9xFfdSDZFeparEvIPDseEfLIG7joAj4Ag4Ao7AmSHwSvX9VTqx+BpNjkWvUiWimPBqzWdybYM2T+/3joAj4Ag4Ao7ArUVAuo9vNnB9WVPJQaUamcDsezFnCuzkCDgCjoAj4AicCwKs1H4p/de77GtgVClVMXsHU12XltBdR8ARcAQcAUfgNiMQJ5Lsozb+M7Wvzv8DCZ37ng/2hGYAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\left( \\frac{2 \\left(-1\\right)^{k + 1} \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{3}\\left(\\frac{k}{t}\\right)}{k m} - \\frac{nka \\left(x + 1\\right)}{t}, \\  0\\right)$"
      ],
      "text/plain": [
       "⎛      k + 1     ⎛k⋅(x + 1)⎞        ⎛   k⎞                 ⎞\n",
       "⎜2⋅(-1)     ⋅cosh⎜─────────⎟⋅besselk⎜3, ─⎟                 ⎟\n",
       "⎜                ⎝    t    ⎠        ⎝   t⎠   nka⋅(x + 1)   ⎟\n",
       "⎜───────────────────────────────────────── - ───────────, 0⎟\n",
       "⎝                   k⋅m                           t        ⎠"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nka_old=nka\n",
    "nka=sympy.Symbol('nka')\n",
    "skaalt=(-nka*(1+x)/t+2*(-1)**(k+1)/k*\n",
    "        sympy.cosh(k*(x+1)/t)*sympy.besselk(3,k/t)/m)\n",
    "diff=sympy.simplify(skaalt.subs('nka',nka_old)-ska)\n",
    "nka=nka_old\n",
    "skaalt,diff"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Energy density for antiparticles:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAABxgAAAA8CAYAAABVcW9bAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4Ae2d67HlNP61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mACJmACJmACJmACJmACJmACJmACJmACJnBZAo8vm3Nn3ARMwARMwARMwARMwARMwARMIJnAN998864CP9fylxa2P9TyUv6vtbYzARMwARMwARMwARMwARMwARO4EAFPMF6osJ1VEzABEzABEzABEzABEzABE5hA4Fud+x9NKH5PHFp/pdW/tbzNvp0JmIAJmIAJmIAJmIAJmIAJmMB1CHiC8Tpl7ZyagAmYgAmYgAmYgAmYgAmYQIOAJgmfyONnLc+0/KX99xoBmjsvm7t373BOy8+7JmACJmACJmACJmACJmACJmACFyDgCcYLFLKzaAImYAImYAImYAImYAImYAIxAppQvJf/x1r/ofXvsTDBT2Han0L9RMd4q9HOBEzABEzABEzABEzABEzABEzgYgQ8wXixAnd2TcAETMAETMAETMAETMAETCBC4H35td9QjASrPo36Dx38TpOOxedSowHtaQImYAImYAImYAImYAImYAImcFoCj06bM2fMBEzABEzABEzABEzABEzABExgkIAmCZ+Xgf41GFgBFP6VVh9p4c1H/ofRzgRMwARMwARMwARMwARMwARM4GIEPMF4sQJ3dk3ABEzABEzABEzABEzABEygReBj7d9rspDPpSa5MuzXCvyttnn70c4ETMAETMAETMAETMAETMAETOBCBPyJ1AsVtrNqAiZgAiZgAiZgAiZgAiZgAhECvMFYvb2oCUP+W/FDLU+0fM1koha2/0/LR9oO/8UYJiSfyT/4adPOBEzABEzABEzABEzABEzABEzg7AT8BuPZS9j5MwETMAETMAETMAETMAETMIEOAuXEIW8g/koQ7TO5iPtOy2flgj+TiX9p+Y+W4JiYxP+n4OG1CZiACZiACZiACZiACZiACZjANQj4DcZrlLNzaQImYAImYAImYAImYAImYAIxAkwS4v6lScRiW+tftDDpyGRi9Wajtj/V8kLH/qs1jrccP9B+eJOx8PSPCZiACZiACZiACZiACZiACZjA+Qm89ebNm/Pn0jk0ARMwARMwARMwARMwARMwARO4IaDJwfCmIv+n+Lv2/anTG0r2MAETMAETMAETMAETMAETMAETaBPwJ1LbRLxvAiZgAiZgAiZgAiZgAiZgAtchwFuLvKn4gZYvNcHIm4t2JmACJmACJmACJmACJmACJmACJtBLwBOMvXh80ARMwARMwARMwARMwARMwATOSUCTiU+Us3e1vNT2l1r/rOUPTzKKgp0JmIAJmIAJmIAJmIAJmIAJmEAvAU8w9uLxQRMwARMwARMwARMwARMwARM4LYHPypyF/1n8vdxn0vFOE41flftemYAJmIAJmIAJmIAJmIAJmIAJmECDgCcYGzi8YwImYAImYAImYAImYAImYAKXIfCxcvpaE4n3rRzzyVTcOw8r/5qACZiACZiACZiACZiACZiACZhAk4AnGJs8vGcCJmACJmACJmACJmACJmACVyHAJ1JfhsyWE41fa5//YuTtxepYCOO1CZiACZiACZiACZiACZiACZiACUDg/wOMIWdcYN8QBgAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{2 \\left(-1\\right)^{k} t \\left(2 k^{2} x \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{0}\\left(\\frac{k}{t}\\right) + 2 k^{2} \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{0}\\left(\\frac{k}{t}\\right) - k^{2} \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right) + 4 k t x \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right) + 4 k t \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right) - 3 k t \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{0}\\left(\\frac{k}{t}\\right) - 6 t^{2} \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} K_{1}\\left(\\frac{k}{t}\\right)\\right)}{k^{3}}$"
      ],
      "text/plain": [
       "      k   ⎛   2       ⎛k⋅(x + 1)⎞        ⎛   k⎞      2     ⎛k⋅(x + 1)⎞        ⎛   k⎞    2     ⎛k⋅(x + 1)\n",
       "2⋅(-1) ⋅t⋅⎜2⋅k ⋅x⋅sinh⎜─────────⎟⋅besselk⎜0, ─⎟ + 2⋅k ⋅sinh⎜─────────⎟⋅besselk⎜0, ─⎟ - k ⋅cosh⎜─────────\n",
       "          ⎝           ⎝    t    ⎠        ⎝   t⎠            ⎝    t    ⎠        ⎝   t⎠          ⎝    t    \n",
       "────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
       "                                                                                                        \n",
       "                                                                                                        \n",
       "\n",
       "⎞        ⎛   k⎞               ⎛k⋅(x + 1)⎞        ⎛   k⎞             ⎛k⋅(x + 1)⎞        ⎛   k⎞           \n",
       "⎟⋅besselk⎜1, ─⎟ + 4⋅k⋅t⋅x⋅sinh⎜─────────⎟⋅besselk⎜1, ─⎟ + 4⋅k⋅t⋅sinh⎜─────────⎟⋅besselk⎜1, ─⎟ - 3⋅k⋅t⋅co\n",
       "⎠        ⎝   t⎠               ⎝    t    ⎠        ⎝   t⎠             ⎝    t    ⎠        ⎝   t⎠           \n",
       "────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
       "                                 3                                                                      \n",
       "                                k                                                                       \n",
       "\n",
       "  ⎛k⋅(x + 1)⎞        ⎛   k⎞      2     ⎛k⋅(x + 1)⎞        ⎛   k⎞⎞\n",
       "sh⎜─────────⎟⋅besselk⎜0, ─⎟ - 6⋅t ⋅cosh⎜─────────⎟⋅besselk⎜1, ─⎟⎟\n",
       "  ⎝    t    ⎠        ⎝   t⎠            ⎝    t    ⎠        ⎝   t⎠⎠\n",
       "─────────────────────────────────────────────────────────────────\n",
       "                                                                 \n",
       "                                                                 "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "edka=sympy.simplify(-Pka+t*ska*m-(x+1)*m*nka)\n",
    "edka"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Re-express in terms of K2 and K3:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png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left(\\frac{k}{t}\\right) + 3 k t \\left(K_{2}\\left(\\frac{k}{t}\\right) - \\frac{2 t K_{1}\\left(\\frac{k}{t}\\right)}{k}\\right) + 6 t^{2} K_{1}\\left(\\frac{k}{t}\\right)\\right) e^{\\frac{k \\left(x + 1\\right)}{t}}}{k^{3}}$"
      ],
      "text/plain": [
       "            ⎛                         ⎛                           ⎛   k⎞⎞                     ⎞  k⋅(x + \n",
       "            ⎜                         ⎜                2⋅t⋅besselk⎜1, ─⎟⎟                     ⎟  ───────\n",
       "    k + 1   ⎜ 2        ⎛   k⎞         ⎜       ⎛   k⎞              ⎝   t⎠⎟      2        ⎛   k⎞⎟      t  \n",
       "(-1)     ⋅t⋅⎜k ⋅besselk⎜1, ─⎟ + 3⋅k⋅t⋅⎜besselk⎜2, ─⎟ - ─────────────────⎟ + 6⋅t ⋅besselk⎜1, ─⎟⎟⋅ℯ       \n",
       "            ⎝          ⎝   t⎠         ⎝       ⎝   t⎠           k        ⎠               ⎝   t⎠⎠         \n",
       "────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
       "                                                     3                                                  \n",
       "                                                    k                                                   \n",
       "\n",
       "1)\n",
       "──\n",
       "  \n",
       "  \n",
       "  \n",
       "──\n",
       "  \n",
       "  "
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "edka2=edka.subs(sympy.besselk(0,k/t),sympy.besselk(2,k/t)-\n",
    "               2*t/k*sympy.besselk(1,k/t))\n",
    "edka2=edka2.subs(sympy.besselk(1,k/t),sympy.besselk(3,k/t)-\n",
    "               4*t/k*sympy.besselk(2,k/t))\n",
    "edk2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now express in terms of B2 and B3:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAA2MAAAA8CAYAAADrAWK2AAAACXBIWXMAA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Bi0XAztjFqtYdMwJGwAgcHgFeU3yRehGdMj7kwW/H2BWr7qU8PhsBI2AEjIAROBIC/wfY4qD8bhEnigAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{2 \\left(-1\\right)^{k} t \\left(2 B_{2} k x \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} + 2 B_{2} k \\sinh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} + B_{2} t \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)} - B_{3} k \\cosh{\\left(\\frac{k \\left(x + 1\\right)}{t} \\right)}\\right)}{k^{2}}$"
      ],
      "text/plain": [
       "      k   ⎛             ⎛k⋅(x + 1)⎞              ⎛k⋅(x + 1)⎞            ⎛k⋅(x + 1)⎞            ⎛k⋅(x + 1\n",
       "2⋅(-1) ⋅t⋅⎜2⋅B₂⋅k⋅x⋅sinh⎜─────────⎟ + 2⋅B₂⋅k⋅sinh⎜─────────⎟ + B₂⋅t⋅cosh⎜─────────⎟ - B₃⋅k⋅cosh⎜────────\n",
       "          ⎝             ⎝    t    ⎠              ⎝    t    ⎠            ⎝    t    ⎠            ⎝    t   \n",
       "────────────────────────────────────────────────────────────────────────────────────────────────────────\n",
       "                                                      2                                                 \n",
       "                                                     k                                                  \n",
       "\n",
       ")⎞⎞\n",
       "─⎟⎟\n",
       " ⎠⎠\n",
       "───\n",
       "   \n",
       "   "
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sympy.simplify(edka2.subs(sympy.besselk(2,k/t),sympy.Symbol('B2')).subs(sympy.besselk(3,k/t),sympy.Symbol('B3')))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Now generate the code (this isn't useful yet):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "prterm=pow(-1, k + 1)*K2exp*pow(t, 2)*exp(k*x/t)/pow(k, 2)\n",
      "nterm=prterm*k/t\n",
      "enterm=pow(-1, k + 1)*K1exp*exp(k*x/t)/(k*m) + nk*(-k*x - k + 4*t)/(k*t)\n",
      "edterm=pow(-1, k + 1)*t*(K1exp*k + 3*K2exp*t)*exp(k*x/t)/pow(k, 2)\n"
     ]
    }
   ],
   "source": [
    "Pk2=sympy.simplify((Pk*sympy.exp(-k/t)).subs(sympy.besselk(2,k/t),'K2exp'))\n",
    "print('prterm='+sympy.ccode(Pk2))\n",
    "print('nterm=prterm*k/t')\n",
    "t1=(skalt.subs('nk',0)*sympy.exp(-k/t)).subs(sympy.besselk(1,k/t),'K1exp')\n",
    "sk2=sympy.simplify(t1)+skalt.subs(sympy.besselk(1,k/t),0)\n",
    "print('enterm='+sympy.ccode(sk2))\n",
    "print('edterm='+sympy.ccode(sympy.simplify(edk3*sympy.exp(-k/t)).subs('B1','K1exp').subs('B2','K2exp')))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Testing numerical values for nondegenerate expansion"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Electrons at T=0.1 MeV:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "tval=0.1/0.511"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [],
   "source": [
    "Tval=0.1/197.33"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "mval=0.511/197.33"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "muval=8.0e-12"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "psival=(muval-mval)/Tval"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "xval=tval*psival"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Construct an array of pressure, density, entropy, and energy density for a range of value for k:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": [
    "arr=[Pk,nk,sk,edk,Pka,nka,ska,edka]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {},
   "outputs": [],
   "source": [
    "arr2=[arr[i].subs('t',tval).subs('x',xval).subs('m',mval) \n",
    "      for i in range(0,8)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[[ 1.78966486e-04 -1.62882635e-07  3.37209953e-10 -9.63299320e-13\n",
      "   3.27050929e-15]\n",
      " [ 3.53154567e-01 -6.42832607e-04  1.99624920e-06 -7.60351419e-09\n",
      "   3.22684799e-11]\n",
      " [ 2.79478879e+00 -4.14195654e-03  1.19406589e-05 -4.37722408e-08\n",
      "   1.81481669e-10]\n",
      " [ 1.23733555e-03 -1.93611729e-06  5.71390187e-09 -2.12189542e-11\n",
      "   8.86981063e-14]\n",
      " [ 3.57932966e-04 -3.25765259e-07  6.74419874e-10 -1.92659852e-12\n",
      "   6.54101806e-15]\n",
      " [ 1.11500790e-08 -4.05920517e-11  1.89081532e-13 -9.60256926e-16\n",
      "   5.09403121e-18]\n",
      " [ 5.58957751e+00 -8.28391284e-03  2.38813168e-05 -8.75444763e-08\n",
      "   3.62963310e-10]\n",
      " [ 2.47467105e-03 -3.87223445e-06  1.14278032e-08 -4.24379057e-11\n",
      "   1.77396199e-13]]\n"
     ]
    }
   ],
   "source": [
    "arr3=numpy.zeros( (8, 5) )\n",
    "for i in range(0,8):\n",
    "    for j in range(0,5):\n",
    "        arr3[i][j]=sympy.N(arr2[i].subs('k',j+1))\n",
    "print(arr3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Degenerate expansion"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [],
   "source": [
    "z=sympy.Symbol('z',positive=True)\n",
    "x=sympy.Symbol('x',positive=True)\n",
    "pi=sympy.Symbol('pi',positive=True)\n",
    "t=sympy.Symbol('t')\n",
    "fz=(z*(2+z))**(sympy.Rational(3,2))/3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Show the first few terms:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1:\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAMwAAAAuCAYAAABkrvZ7AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAI/klEQVR4Ae2d7XHVOhCGT5gUEKCD0MElVAB0wEcFgQ5g8gv+MdABUEGADqADPjqADm5uOsh9HyNpbB/Zsi3L5zizmlFky9rV7ivtriSfc3JwdXW1mZJev359JLozR3vsylPVXw7hl0s/pA9rYwjMjcBhBsO3mvTPPb2u3+v6p/IdX5coc+kT7O3xviGgOfKPZGKOrDYdZEQYQtNDgfAN7VUSZX4r39X1L+r6ktpk0ffx9s/Ux+gBEs2Bp+8r1e5Y+U9fmzU8W1IP9fVVmLxUmZwf+4pdToQhuvzIUCyXfkjXb9VokAEPYebbaMBf6BpjWb3BSAcM/5HyO69fiVL8cV4blas1FuSfbDBS/AMMagkD+DMUkFz6Wr/RS/EvMkDi+0gd3lZZdIJFlZpY6bD4LHKcR2OPqftvPFd+ptwe04k9RsnY7+LA9joJA1ZKL52QJyovuFd9ZeiTDcYxrAoxY3Iyke7W6/21nnNAwNqVJdyWV07Rez4jy9kHyOlxpjKq50j5ijZ3sn5UJww4A+8PZrb6Vdt3yj+VPyk3DGqr8YQK8aRvIlm1fJ/AYhESJ+d7lQ99h7rGyMGm2n7c8A+mlq4Tv/TpAvuB+AMag9d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mjEfr+cbpEt9YWy0gEaQ8Q+VDLzZETgRR77fw6+WPFX+V5l9C9/Dry/RVGVpVwjYpn9XyG/3y16FdCIDCV/E0vV/yqfKQ36o4y8H+1sMAVuSFYN2OGMZgzcWfqiw/Wsu/E7cx1qb4Yyt5ewImMHMDmkWw9i3HvlmKQbFks3SjhEwg9nxANC9ooff6PsyJtVxrNLqlkXADGZZvPt6Y2Pvl2axdrHoE2tndQURMIMpCO5I1vxySyyK8POtHDfbSdlIQEs0N4MpgeoEnjIITsH451Xhc2S6JuLwryBOJ7A0kgII2Jv+AqDmsHQG45dm/Hj4G9XZBy9zQJ2R9n/eB742CeW1QQAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{\\pi^{2} t^{2} \\sqrt{x} \\left(x + 1\\right) \\sqrt{x + 2}}{6}$"
      ],
      "text/plain": [
       " 2  2              _______\n",
       "π ⋅t ⋅√x⋅(x + 1)⋅╲╱ x + 2 \n",
       "──────────────────────────\n",
       "            6             "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2:\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQQAAAA6CAYAAABWDydjAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAQYElEQVR4Ae2d7ZXVNhCGL3u2gA3bAXSwgQpCOiBQAaQDcvgF//aEDhIq2CQdkFSwGzpIOghsB+R9tB4hy7Kvv++1rTlH17Y+RjOjmdFI9rXvffnyZTcHvH379mf181/R162uf+3a70g4Xqrff4Xrz679z1lf9D1Qf0+UPilx/ljpUvkfdVwFiJczMfK6YAYegRfKv707zb9jSkBy/UXpxyacJ02FY5WJiL+F60rHdzpiiL90xT0Sjqfq91vhOmpnUMgGB/pQtP5RyO1a138VZWs5/CzefirSD2IK54euZJhGAsj7QxPqyR2CCECxb3R0M1tx/L6JqLhsJBxuNhKuRg8Z933A60v1fRX0f65zDGZN8FLjQR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0oWcWc7E4PgX3amNTPhuTb/qthlLZIvjS4JwMG4XSmz0Uof6R/88BoSOCZt0CBpwDPa+jvEdgVayVTtuG1K3zogo464FD8ZwnlJEy3NOQPXiPQw2wC5p3AWEx0LeGF8XNL7uULrUPmXwO+UT/SCjQUan9m3HssnpQU8YYXn+t3ayuSWDBh5FfKijn4F0jmI2hpMJxWCTyow6Uex37amXwu1mSJVVNvNEy5MCt99AVB63J5v626m8b8hLON2IW+Xg70UXbacA0dNlLOEPPjM0SGBTDkEKREiY+pQbitVVWZiJU4bOTEMEYYbO2vaRUgx+SaC6GPsHJQwOYFYFR7iEeK3rW1ea+FEZIS/rXu6381xCcmZONCWLfiq8CM9gumr6G5wt2rqOJQ44lOdgGtaI4HSNTKV4kgKh8BgnYTzGHAI7+anQ9byohDKVjFH12YwEFzvw7i6FjsxChPrcLnSgPB6KYaOKh5/cjK+j1bOHmnAEJOpRVnJOyqPsWqkWVGdIyPtRiB8nkA+mK4FzcJZ47TOWzgEP7nzlCE5Xzl/IHrfhUCTWnDFgEB6kcDgOAIMAuKXH7MIsbrv+O53zXwQcgjkYHAfPzJfwKQ9lpB5GxyYix7Ae0QR4XX+qx3/z6Qu8zPyfdO6XD7oeG66E0HgOcR+arpCW8Lz1WAaNkG2XqCloup3Tzfy5aTtD2o9TORzu0/OSldiZ9UO4p5X6YZk2eFNxTzeuWH0xEeBg/R/O2rTbYp2TLTKdeU5KgA3JOWdQlmCkOYAlHfxl2COBHCHsEdCWijWDEoqzXFnN5lsRHZT+9r6lMe3Ka44Qukps3fW5FWv7IWvhFH7mjHwWLbccISx6+MYnvphRuSOSuusyfocTYhQP3IblbtBqIp4JxeVQ/w+o9iEXYKCPoAAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{7 \\pi^{6} t^{6} \\left(- 2 x^{3} - 6 x^{2} - 3 x + 1\\right)}{2160 x^{\\frac{3}{2}} \\left(x + 2\\right)^{\\frac{3}{2}}}$"
      ],
      "text/plain": [
       "   6  6 ⎛     3      2          ⎞\n",
       "7⋅π ⋅t ⋅⎝- 2⋅x  - 6⋅x  - 3⋅x + 1⎠\n",
       "─────────────────────────────────\n",
       "             3/2        3/2      \n",
       "       2160⋅x   ⋅(x + 2)         "
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "3:\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVUAAAA2CAYAAAB3GwpuAAAACXBIWXMAAA7EAAAOxAGVKw4bAAARgUlEQVR4Ae2d7ZXVthaGD7MogJAKLumAjwogHSRQAaSDy+IX+TcLOkiogI8OQiqA0EFyK4BMB9z30UhC9pFt2ZZ9fM7svZZGtj629t6SXm3JPp5rX79+3RmZBZawwK+//vpEfG8ofO/jF0r7p7StufVL27FyZoGaFrhek5nxMgsECwgQ/6vrdwFEFQOubxV+DGX64rn1+3hbnllgSQucLcnceF9pCwCet4IFBJIXur4Z7gviufVjE2o7yhETj/DiVPQ4QtOPEtlAdZS5rPAIC/yhsn8ICF5QRzFHAb9xXUhz67tm1C4e8+3CNrde7JbXZ+tyXmn5rtmZ6mn2vyYf3tkvXju23txzpvnepzUipQM8bM/v6BqvcjaJD4DmQFXxS90/HcO0Qv2f1N69se2OkbF2Wcna2w/eJheKf6/dtvGrYwED1Tp23BQXTThAFAANoLrTNQADaP6s63cIrJhyrxS+KNxVYEJ/p/TZoCoe8HqmcO5j2v9d6VEm3Tvycvylmx917R5kjanv2TQiz/NPxXcaGRu88bIW94PKY6v7imf30wbNcfQi2YOqo+/CrAJstZ9o0rH9dgCq++ChAnQBVJmUPyvsVK72NvmVeAZAA8gfqJm3in9T+ESbCZGHJw24BxpTP9RJYzzkMccNad3R114/tuejPUjVGdsP6IV+ewvUaMGtQnUL2JlqdZNugiGgxUSNnoyfuKsIp7baALlTGqAO4JDXJh5K/RNknFC/zY/7h+IzGuByjArTbqgcYXHyeqHfKu0trtCJNWCgemI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ICpIgfoWVAlE1I5+OOxPlHclo92uo4FZslK20uSdMEOLHhtWzGZ9s6HvSzYuXH25NN34rNpfYOcHfHgmD9y/TrUzidL196xsVVbSC7m6iCOZLTGYUsxZHeWKTQ5SULh9QFgETB1zYRhK/c4MFYaE++LYiaho1y5kNeK4UdICYDl6XwjXfd4g7xWhdJ4PwTapVxjdVEaeR8UsqR8zlrc91R9nN22ZyoHW0QAUn305jjiIlOepFmydvCskiyZAUYWpxu65sl0DErjOKNLJ7z3ewo52qy+OWHTNOlbMuaPVr9UV3/NkRYEmDRItigZG1u2RQmONHTWjXME08Tr6U2NaxmWh0S8LhG2thg/fZ8wNIMwlGOi8WCKOFdOyc7rg1/wdB6oHhObd0p5PQogB7R5KJWCJUAbvF1iwJxO3SkdAABw4YsXCtjGowDK1CDx5AiCtp8odkcHun6mcL+H/0Fk7ZEnzeJVMvqBBatNAGcXvVYGfZajLeubk7eRpn4dGvNHrR/KSsfQd27+KIm5hbPCHAq7k5KxsVlbSI8SHMEcKWGPxvmufaQ6Nc9C1+osDM+Aw1tlIDIJGx2htNVIbeMpz35QNVZgtctDQ37x1ge+Y9nOLn8oe8wWfASDq6Aj5lhTT7WFc8Gi0ti1no3oFys60QIyOqszQIKHSghHAro8CLFF79qmLykQeh9sMelR7FD26BGpetZV0BGjraknTtLeXDZPtfrYzTP0KyhbKM5SObu5kiTd8dg5emkc7l9JY5jSR2sBjV+8VJ4n7L1OaJ7qSt0q43Nei7caH1it1PTWmmFB4RzbyCxwzBZgDGd3XeapHnO3HqnsfpXn57m9r6QdqXom9olbQOOWd8/ZcWZ3W/8HFbkZ5Iiw4xcAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle - \\frac{31 \\pi^{8} t^{8} \\left(x + 1\\right)}{6048 x^{\\frac{7}{2}} \\sqrt{x + 2} \\left(x^{3} + 6 x^{2} + 12 x + 8\\right)}$"
      ],
      "text/plain": [
       "                 8  8                     \n",
       "            -31⋅π ⋅t ⋅(x + 1)             \n",
       "──────────────────────────────────────────\n",
       "      7/2   _______ ⎛ 3      2           ⎞\n",
       "6048⋅x   ⋅╲╱ x + 2 ⋅⎝x  + 6⋅x  + 12⋅x + 8⎠"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "4:\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfAAAAA3CAYAAADzNhheAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAYwklEQVR4Ae2d7bUcNRKGx/fcAIyJAMjAHxHgzWAXR2CTwXL8C/75QAZABAYyACK4xhnARoC5GXjfR1fVVqvVPf093TNV52i6Wx+lqldSlaTWzNx7//79wckRWBqBb7755r7q+ELhS90/yutT3Lcx7m9dP9bzV3meruel+ad1q64Xev5L19/S+DnvxftT8Xuq8E6B+ycKrxT/VtezIOlCn3gZlUFH6Lnib+9u/XNuBITt9wpfzs3X+Z0GgavTVOu1XhICMhgPpS9OD4NNqJHSSftb168UvtP9r7r+WsvU8aC8i/JPq1Zd/9bzI10Xc96xPiY0n6meXxTA5Ebh95h2LpdvpRttTviPlGKy8se5KLdRPcC899jaqA4uVkTAHbh3hcURkMF4q4AT+qulMpxV5RCVl/unutqqrKXYXfTS/K1y1RNWjLqusYJ5pXpfW926fqyAgzsneiEs2WUwoh98qjgmZE4LICBsGYM/6/rfBdg7y5URuF65Pq9ugwhoMOMoMaQ/6X7V7ctYN44xd+7IgSHP4xXVn2bm/7Nq/r5/7eNzSu58q5yVPw7unIiJ0JstKBT7yUnGwNr6S9cfFP6M11XH+9q6nnt97sB33sIahDg5HAvbuo3BqDics71Pfqx7VnFsWaYOAh44Jt6P6dKgW8V/1IidJwLnXSLkfFBKGBg3C/+I42Nd/5XXH9OOYZwX6/Us3qyUninQNj/0KrRgJsmQTyJeKy7tS71rL+iDQ+dswSh+vSsuZzzlGChLNDBWuDHWbXeIfs8zW+bV7lbCkvH+owKvLpx2ioA78B02nAYk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Ao6AI7AqAtjK4q6lr8BXbQevzBCIs0p+RtYONFmSXx0BR8ARcASEgOwj395i17a4W/l/vyJMfmtIhNYAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\frac{127 \\pi^{10} t^{10} \\left(2 x^{3} + 6 x^{2} + 7 x + 3\\right)}{11520 x^{\\frac{11}{2}} \\sqrt{x + 2} \\left(x^{5} + 10 x^{4} + 40 x^{3} + 80 x^{2} + 80 x + 32\\right)}$"
      ],
      "text/plain": [
       "                  10  10 ⎛   3      2          ⎞              \n",
       "             127⋅π  ⋅t  ⋅⎝2⋅x  + 6⋅x  + 7⋅x + 3⎠              \n",
       "──────────────────────────────────────────────────────────────\n",
       "       11/2   _______ ⎛ 5       4       3       2            ⎞\n",
       "11520⋅x    ⋅╲╱ x + 2 ⋅⎝x  + 10⋅x  + 40⋅x  + 80⋅x  + 80⋅x + 32⎠"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "fz1=sympy.diff(fz,z)*pi**2*t**2/6\n",
    "print('1:')\n",
    "display(sympy.simplify(fz1.subs(z,x)))\n",
    "\n",
    "fzt=fz1\n",
    "for i in range(0,3):\n",
    "    fzt=sympy.diff(fzt,z)\n",
    "    fzt=sympy.diff(fzt,z)\n",
    "    n=sympy.Rational(i+2,1)\n",
    "    term=(fzt.subs(z,x)*pi**(2*n)*t**(2*n)*sympy.bernoulli(2*n)*2*\n",
    "          (2**(2*n-1)-1)/sympy.factorial(2*n))\n",
    "    term=sympy.simplify(term)\n",
    "    print(str(i+2)+':')\n",
    "    display(term)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {},
   "outputs": [],
   "source": [
    "prefix='for (j=0;j<9;j++)'"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
